<html>
<head>
<title>Demo page</title>

</head>
<body>
<div id="output"></div>
<p>
	<img id="image"  src=""/>
</p>
<script src="http://cdn.staticfile.org/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.qrcode.min.js"></script>
<script>
$(function(){
	//canvas输出
	$('#output').qrcode("https://www.baidu.com");
	//转换为img地址
	$('#image').attr('src',$('#output canvas')[0].toDataURL("image/png"));
})
</script>
</body>
</html>
